<template>
  <div class="statis_wrapper">
    <div class="statis_inner">


      <div class="progress_wrapper" style="margin: 20px;display: flex;"  v-for="item in progress">
        <div style="width: 150px;"> {{item.name}}</div>
        <div style="width: 100%;">
          <el-progress  :text-inside="true" :stroke-width="20" :percentage="item.num" status = "">
          </el-progress>
        </div>
      </div>


    </div>
  </div>
</template>

<script>
  import {postRequest} from "../utils/api";

  export default {
      name: "Statis",
      data(){
        return {
          progress: [
            {
              name: '很重要',
              rate: 15,
              status: 'exception'
            }
          ]
        }
      },
      mounted() {
        this.getProgress()
      },
      methods: {
        getProgress(){
          let param = {token: window.localStorage.getItem("token")}
          postRequest('word_consumer/get_progress', param).then(res=>{
            this.$message({showClose: true, message: res.data.msg, type: 'success'})
            this.progress = res.data.t.staticBeans
          }).catch(err=>{
            this.$message({showClose: true, message: JSON.stringify(err), type: 'error'})
          })
        }
      }
    }
</script>

<style scoped>

</style>
